package testAndSomeTries;

import javax.swing.*;
import java.awt.event.*;

public class window {
	public static void main(String[] args) {
		
		/* creation of a window */
		JFrame main_frame = new JFrame("HINB");		
		/* behavior on closing */
		main_frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
		/* create a menu*/
		JMenuBar menu = new JMenuBar();
		JMenu aboutHinb = new JMenu("About HINB");
		aboutHinb.setMnemonic(KeyEvent.VK_A);
		JMenuItem about = new JMenuItem("About");
		about.setMnemonic(KeyEvent.VK_A);
		about.setAccelerator(KeyStroke.getKeyStroke(
                KeyEvent.VK_A, ActionEvent.ALT_MASK));
		about.setActionCommand("About");
		about.addActionListener(new ActionListener() {
			
			@Override
			public void actionPerformed(ActionEvent e) {
				JFrame about_frame = new JFrame("About HINB");
		    	JLabel about_label = new JLabel("HINB Is Not Blobbyvolley");
		    	about_frame.getContentPane().add(about_label);
		    	about_frame.setVisible(true);
				
			}
		});
		aboutHinb.add(about);
		menu.add(aboutHinb);
		main_frame.getContentPane().add(menu);
		main_frame.setJMenuBar(menu);
		/* display */
		main_frame.setVisible(true);
	}
	
	public void actionPerformed(ActionEvent e) {
    if ("About".equals(e.getActionCommand())) {
    	
    } 
}
}


